package ${packPath}.controller;

import ${packPath}.entity.${entityName};
import ${packPath}.service.${entityName}Service;
<#if swagger=="true" >
import io.swagger.annotations.Api;
</#if>
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xiaov.common.bean.R;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * ${entityName}API接口层
 * </p>
 *
 * @author ${author}
 * @date ${date}
 */
<#if swagger=="true" >
@Api(value="${entityName} API接口层" )
</#if>
@RestController
@RequestMapping("/${entityNameLow}")
public class ${entityName}Controller{

    @Resource
    private ${entityName}Service ${entityNameLow}Service;

    @GetMapping("/")
    public R list() {
        List<${entityName}> list = ${entityNameLow}Service.list();
        return R.okMsgAndData("操作成功", list);
    }
}